Deploying WordPress Using Cloud Marketplace

In the last lesson, you learned how deployments help us in the automation of infrastructure. Also, we can use deployments to replicate the environment in a few minutes. Google cloud has used this replication strategy and has created multiple deployment files for a lot of softwares that are used by so many professionals.

Introduction#

The Cloud Marketplace is the one-click-deployment solution of the Google Cloud Platform. You can deploy any popular software, CMS, tool, or API from the cloud marketplace. WordPress is a very popular content management system. If you want to host a WordPress instance on google cloud then you don’t have to go through the tedious process.

Explore the marketplace#

  • Open the main menu > Marketplace.

You can search for any popular tool which comes with an installation binary. In the extreme left, you will see the categories of software from which you can choose.

Try to search 2-3 well-known tools like Drupal, WordPress and click on them to see how guided instructions for installations works.

(Do not install any software without checking the monthly price.)

Installing WordPress#

WordPress is at the home screen of Cloud Marketplace. Click on it to start the installation. Before clicking on “Launch”, check out the monthly cost of the resources under the pricing tab.

The cost of WordPress running with the default configuration provided with the one-click install deployment will cost us around $38 a month.

We have almost $270 left in credits so you can still have the WordPress running for a month if you want.

To proceed, click on the “Launch” button. You will get a form to fill up the basic details about the deployment. You can keep all as default and fill the necessary ones which are:

  • Deployment Name
  • Administrator e-mail address

For the firewall section,

  • Check the HTTP & HTTPS access to the internet.

For Stackdriver,

  • Enable Logging and Monitoring both.

Once done, access the terms and conditions and click “deploy”.

This will take you to the “Deployment Manager” dashboard. Wait until all the resource creation is done and you get it. a “Green” mark saying WordPress is deployed.

widget

Explore WordPress configs#

The extreme right pane has all the details specific to WordPress.

You can find here everything you need to configure your newly created WordPress. If you have never used WordPress before, this is the right time for you to learn it for free then. If you go to the site address, WordPress will have a static default website which you can change using the admin dashboard of WordPress. Link and credentials for the admin panel are also displayed.

Exploring the deployment#

In the middle pane, you will see the list of files under the collapsable menu. These files are templates that are used to create the deployment. Click on the “Overview - [Name of the deployment]” to see all the imports. The overview will show you all the details about the manifest including the manifest name.

You can also check the code written in the imported files by clicking on it.

Template

So, the files having extensions like .jinja and .py are the template files.

To see the code for the .jinja template you can click on the wordpress.jinja, scroll down to the “Template properties” and click on show more. You will see the .jinja file there.

You can also check how the python templates are imported into the jinja file.

Resource

You can manage all the services created by the deployment using the deployment manager. Click on the VM instance file and then you will get the button to access the VM which is in use by WordPress.

Manifest

The “Overview” tab contains the manifest. Click on the Overview folder and scroll down to the “Expanded Config”. This is the detailed YAML configuration of the WordPress deployment.

Cleaning up#

To clean up all the resources created by the deployment just delete the deployment.

Click on the “delete” button and then select to delete all the resources created by the deployment. This will delete all the resources.

This is how deployments work and how easy it becomes to manage the infrastructure of related software using deployments. You can try deploying other tools as well like Drupal or Jenkins.

Deployment Manager

GCP Certified Associate Cloud Engineer Practice Exam